/**
 * 业务常量
 */

/**
 * 难度常量
 */
export const DIFFICULTY = {
  EASY: 'easy',
  MEDIUM: 'medium',
  HARD: 'hard'
}

/**
 * 难度选项
 */
export const DIFFICULTY_OPTIONS = [
  { value: 'easy', label: '简单', type: 'success', color: '#67c23a' },
  { value: 'medium', label: '中等', type: 'warning', color: '#e6a23c' },
  { value: 'hard', label: '困难', type: 'danger', color: '#f56c6c' }
]

/**
 * 编程语言选项
 */
export const LANGUAGE_OPTIONS = [
  { value: 'cpp', label: 'C++', mode: 'text/x-c++src', extension: '.cpp' },
  { value: 'java', label: 'Java', mode: 'text/x-java', extension: '.java' },
  { value: 'python', label: 'Python', mode: 'text/x-python', extension: '.py' },
  { value: 'javascript', label: 'JavaScript', mode: 'text/javascript', extension: '.js' }
]

/**
 * 提交状态常量
 */
export const SUBMISSION_STATUS = {
  PENDING: 'PENDING',
  RUNNING: 'RUNNING',
  ACCEPTED: 'ACCEPTED',
  WRONG_ANSWER: 'WRONG_ANSWER',
  TIME_LIMIT_EXCEEDED: 'TIME_LIMIT_EXCEEDED',
  MEMORY_LIMIT_EXCEEDED: 'MEMORY_LIMIT_EXCEEDED',
  RUNTIME_ERROR: 'RUNTIME_ERROR',
  COMPILE_ERROR: 'COMPILE_ERROR',
  SYSTEM_ERROR: 'SYSTEM_ERROR'
}

/**
 * 用户角色常量
 */
export const USER_ROLES = {
  ADMIN: 'ADMIN',
  USER: 'USER'
}

/**
 * 设备类型常量
 */
export const DEVICE_TYPES = {
  PC: 'PC',
  MOBILE: 'Mobile',
  TABLET: 'Tablet'
}
